$('#tickets').html("<%= escape_javascript(render 'admin/topics/ticket') %>");
$('.ticket-stats').html("<%= j render 'admin/topics/tiny' %>");
history.pushState(null, null, '<%= admin_topic_path(@topic, status: @status) %>');

// Update timestamps
$('.last-active time[data-time-ago]').timeago();

// jQuery hook
Helpy.ready();
Helpy.track();
Helpy.ticketMenu();

// RTL changes?
<%= "Helpy.rtl();" if rtl? %>

// Update bootstrap_flash
$('.flash-wrapper').html("<%= j bootstrap_flash %>");
// Autoclose alert messages in admin
$(".alert").delay(5000).slideUp(500, function(){
    $(".alert").alert('close');
});
<% flash[:notice] = '' %>
